﻿using System.Windows.Media.Media3D;

namespace Wen.UI.NavigationElements
{
    internal class CameraDirectionViewModel : CameraXyzControlViewModelBase
    {
        private readonly Vector3D _stockLookDirection;

        public CameraDirectionViewModel(ProjectionCamera camera)
            : base(camera) {
            _stockLookDirection = Camera.LookDirection;
        }

        protected override void ApplyXMovement(double step) {
            Camera.LookDirection += new Vector3D(step, 0, 0);
        }

        protected override void ApplyYMovement(double step) {
            Camera.LookDirection += new Vector3D(0, step, 0);
        }

        protected override void ApplyZMovement(double step) {
            Camera.LookDirection += new Vector3D(0, 0, step);
        }

        protected override void Reset() {
            Camera.LookDirection = _stockLookDirection;
        }

    	protected override Point3D RawCoords
    	{
    		get { return new Point3D(Camera.LookDirection.X, Camera.LookDirection.Y, Camera.LookDirection.Z); }
    	}
    }
}
